A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The present invention relates to computer graphics. More particularly, the present invention relates to a method and an apparatus that generates three-dimensional bar charts that use various shapes (including non-rectangular solids) to represent data points so that the various shapes tend not to obscure each other.
Three-dimensional bar charts typically represent a two-dimensional data set as a uniform grid of rectangular blocks of varying heights. This representation can enable a person viewing a three-dimensional bar chart to detect certain patterns in the data. However, when two-dimensional data is plotted on a three-dimensional bar chart, occasionally one rectangular block obscures another. This is especially true when a three-dimensional bar chart is viewed from a preferred angle: centered, head-on, and from slightly above. Viewed from this angle, the taller blocks tend to obscure shorter blocks that appear behind the taller blocks.
One solution to this problem is to make the blocks translucent, so that a given block is visible through another block even if it is obscured by the other block. However, the process of ray tracing translucent solids to render realistic translucent images is too slow and expensive using today""s computer hardware. Furthermore, displaying translucent solids would require displays that provide millions of colors to view the resulting images, and these types of displays are not commonly available on all computing systems.
The present invention provides a method and apparatus for generating three-dimensional bar charts by interspersing non-rectangular shapes amongst rectangular boxes so that the rectangular boxes and non-rectangular shapes tend not to obscure each other. To this end, one embodiment of the present invention provides a method that operates by receiving a set of data values to be displayed in the three-dimensional bar chart. The set of data values is divided into two subsets. A first subset is represented by rectangular boxes projecting from a two-dimensional grid, so that a height of a given box above the two-dimensional grid bears a functional relationship to a data value being displayed by the given box. A second subset is represented by non-rectangular shapes projecting from the two-dimensional grid, which are interspersed between the rectangular boxes, so that a height of a given non-rectangular shape bears a functional relationship to a data value being displayed by the given non-rectangular shape. The method also includes rendering a perspective view of the rectangular boxes and the non-rectangular shapes, and outputting the perspective view to a display device. One variation of the above embodiment alternates tetrahedra with rectangular boxes, wherein the tetrahedra are oriented so that a given tetrahedron is balanced on a lower edge, parallel to a left-right axis of the two-dimensional grid, with an upper, orthogonal edge parallel to a fore-aft axis.